package com.finance.rule.dao;

import com.finance.framework.lang.Page;
import com.finance.rule.bean.pojo.SettlementRegionDetail;
import org.apache.ibatis.annotations.Param;
import com.finance.rule.bean.pojo.SettlementRegion;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface SettlementRegionMapper {
	SettlementRegion getById(@Param("id") long id);
	List<SettlementRegion> listAll();
	List<SettlementRegion> listByPage(Page page);
	List<SettlementRegionDetail> listDetailByPage(Page page);
	List<Map<String,Object>> listDetailMapByPage(Page page);
	int add(SettlementRegion settlementRegion);
	int delete(@Param("uId")String uId,@Param("ids") List<String> id);
	int update(SettlementRegion settlementRegion);
    SettlementRegionDetail getDetailById(long id);
    String getIdByName(String name);
    List<String> getIds(@Param("level") String level,@Param("code") String code);
    Integer getLevelById(@Param("regionId") String regionId);

	void addSettlement(@Param("settlementLevel") int settlementLevel,@Param("toCode") int toCode);
	void updateSettlement(@Param("settlementLevel") int settlementLevel,@Param("toCode") int toCode);
	void deleteSettlement(@Param("toCode") int toCode);
}